#ifndef _NEWRANKREWARDDEF_H_
#define _NEWRANKREWARDDEF_H_
#include "MgrBase.h"
#include "SimpleRefection.h"
class NewRankRewardDef:public ReflectionBase
{
	DECL_REFLECTION(NewRankRewardDef,"../../config/NewRankRewardDef.xml");
public:
	int32			m_iID;
	std::string		m_sDisplayName;
	int32			m_iTopRank;
	int32			m_iLowRank;
	float			m_fCashBonusPerRank;
	int32			m_iCashBounsBase;


	rewrite virtual void OnArchieveReaded();
private:
};

typedef DefMangerTpl<NewRankRewardDef> __NewRankRewardDefManager; //eDefaultDef_Num
class NewRankRewardDefManager:public __NewRankRewardDefManager
{
public:
	static NewRankRewardDefManager& Instance(){static NewRankRewardDefManager _instance;return _instance;	}
	virtual void OnArchieveReaded();

	int32 CalNewTopRankBonus(int32 iNewTopRank,int32 iOldTopRank) const;
	const std::vector<const NewRankRewardDef*> &OrderedRankRewards() const { return m_vOrderedRankRewards;}
private:
	NewRankRewardDefManager(){}
	std::vector<const NewRankRewardDef*> m_vOrderedRankRewards;
};

#endif
/////////////////////////////////////////
